package com.qiaofang.dataprocessing.dao.impl;

import com.qiaofang.dataprocessing.dao.PropertyEntrustDao;
import com.qiaofang.dataprocessing.dao.mapper.PropertyEntrustMapper;
import com.qiaofang.dataprocessing.stub.bean.request.PropertyEntrustRequest;
import com.qiaofang.dataprocessing.stub.bean.response.PropertyEntrustDTO;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: youqing.yang
 * @Create: 2020/12/15 16:21
 * @Description:
 **/
@Repository("propertyEntrustDao")
public class PropertyEntrustDaoImpl implements PropertyEntrustDao {

    @Autowired
    private PropertyEntrustMapper propertyEntrustMapper;

    @Override
    public Long getPropertyEntrustCount(PropertyEntrustRequest propertyEntrustRequest) {
        return propertyEntrustMapper.getPropertyEntrustCount(propertyEntrustRequest);
    }

    @Override
    public List<PropertyEntrustDTO> getPropertyEntrustPage(PropertyEntrustRequest propertyEntrustRequest, RowBounds rowBounds) {
        return propertyEntrustMapper.getPropertyEntrustPage(propertyEntrustRequest, rowBounds);
    }

    @Override
    public Integer acceptEntrustMyself(Long propertyEntrustId) {
        return propertyEntrustMapper.acceptEntrustMyself(propertyEntrustId);
    }
}
